﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMI.NET.CIM
{
    /// <summary>
    /// The CIM_DesktopMonitor class represents the capabilities and management of the desktop monitor (CRT) logical device.
    /// </summary>
    public class CIM_DesktopMonitor : CIM_Display
    {

        private Nullable<UInt32> _Bandwidth;
        private Nullable<UInt16> _DisplayType;
        private Nullable<UInt32> _ScreenHeight;
        private Nullable<UInt32> _ScreenWidth;

        /// <summary>
        /// Monitor's bandwidth in MHz. If unknown, use 0 (zero).
        /// </summary>
        public Nullable<UInt32> Bandwidth { get { return _Bandwidth; } }

        /// <summary>
        /// Type of desktop monitor or CRT. 
        /// </summary>
        public Nullable<UInt16> DisplayType { get { return _DisplayType; } } //TODO enum

        /// <summary>
        /// Logical height of the display, in screen coordinates.
        /// </summary>
        public Nullable<UInt32> ScreenHeight { get { return _ScreenHeight; } }

        /// <summary>
        /// Logical width of the display, in screen coordinates.
        /// </summary>
        public Nullable<UInt32> ScreenWidth { get { return _ScreenWidth; } }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public CIM_DesktopMonitor(ManagementBaseObject mbo)
            :base(mbo)
        {
            _Bandwidth = mbo.GetUIntValue("Bandwidth");
            _DisplayType = mbo.GetUshortValue("DisplayType");
            _ScreenHeight = mbo.GetUIntValue("ScreenHeight");
            _ScreenWidth = mbo.GetUIntValue("ScreenWidth");
        }


    }
}
